<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>产品详情</title>
<meta name="keywords"  content="KEYWORDS..." />
<meta name="description" content="DESCRIPTION..." />
<meta name="author" content="DeathGhost" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="icon" href="${ctxPath}/static/wap1/images/icon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="${ctxPath}/static/wap1/images/icon/apple-touch-icon-196x196-precomposed.png">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="${ctxPath}/static/wap1/css/style.css" />
<script src="${ctxPath}/static/wap1/js/jquery.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/layer/layer.min.js"></script>
<script>
$(document).ready(function(){
  //效果测试，程序对接可将其删除
  $(".btmNav a:first").click(function(){
	  $(".topCart em").html(parseInt($(".topCart em").html())+1);
	  });
});
</script>
</head>
<body>
<!--header-->
<header>
 <a href="javascript:history.go(-1);" class="iconfont backIcon">&#60;</a>
 <h1>产品详情</h1>
 <a href="cart.html" class="topCart"><em>0</em></a>
</header>
<div style="height:1rem;"></div>
<div class="pro_bigImg">
 <img src="${ctxPath!}/static/upload/project/${goods.img!}"/>
</div>
<!--base information-->
<section class="pro_baseInfor">
 <h2>${goods.title!}</h2>
 <input type="hidden" id="goodsid" value="${goods.id!}" />
 <p>
  <strong>${goods.prices!}</strong>
  <del>${goods.prices!}</del>
 </p>
</section>
<!--product attr-->
<dl class="pro_attr">
 <dt>产品属性信息</dt>
 <dd>
  <ul> 
   <li>
    <span>上市时间</span>
    <em>2017-06-12</em>
   </li>
   <li>
    <span>产品规格</span>
    <em>1斤装</em>
   </li>
   <li>
    <span>产品重量</span>
    <em>0.5kg</em>
   </li>
   <li>
    <span>包装方式</span>
    <em>散装</em>
   </li>
   <li>
    <span>保质期</span>
    <em>6个月</em>
   </li>
   <li>
    <span>所属品牌</span>
    <em>三星</em>
   </li>
  </ul>
 </dd>
</dl>
<!--bottom nav-->
<div style="height:1rem;"></div>
<aside class="btmNav">
 <a style="background:#64ab5b;color:white;text-shadow:none;" onclick="addCart(1)">加入购物车</a>
 <a style="background:#87a983;color:white;text-shadow:none;" onclick="addCart(2)">立即购买</a>
</aside>
<script type="text/javascript">
function addCart(type){
	var goodsid=$("#goodsid").val();
	$.ajax({
		type: "post",
 		url: '${ctxPath}/wap1/person/addCart',
		data: {goodsid:goodsid},
		dataType: "json",
		success:function(data) {
			if(data.success){
				if(type==1){
					layer.msg("加入购车成功!",2, 8);
				}else{
					var goodsid1=$("#goodsid").val();
					window.location.href = "${ctxPath!}/wap1/person/LikBuy/"+goodsid1;
				}
				
				
			}else{
				layer.msg("加入购车成功!",2, 8);
			}
		}
	});
}
function addRePly(){
	var content=$("#say_some").val();
	var goodsid=$("#goodsid").val();
	$.ajax({
		type: "post",
 		url: '${ctxPath}/person/addRePly',
		data: {content:content,goodsid:goodsid},
		dataType: "json",
		success:function(data) {
			if(data.success){
				layer.msg("评论成功!",{icon:2});
				
			}else{
				layer.msg("评论失败!",{icon:2});
			}
		}
	});
}
</script>
</body>
</html>
